let user = require('./User')

console.log(`userName:${user.userName}`)
console.log(user.sayHello())

let http = require('http')
let url = require('url')
let util=require('util')

let server = http.createServer((req, res) => {
    res.statusCode = 200;
    res.setHeader("Content-Type", "text/html; charset=utf-8");
    //url.parse(req.url)

    //res.end(util.inspect(url.parse(req.url)));
    res.end(util.inspect(url.parse("http://localhost:4567/index.html?name=sky-Blue")))
}).listen(4567, () => {
    console.log("服务器已经运行,请打开浏览器 Http://localhost:4567/")
})
